package com.example.batch;

import org.springframework.batch.item.file.LineMapper;

import com.example.batch.api.DemoDTO;

public class MyLineMapper implements LineMapper<DemoDTO> {

	@Override
	public DemoDTO mapLine(String line, int lineNumber) throws Exception {
		String[] split = line.split(",");
		DemoDTO dto = new DemoDTO();
		dto.setI(Integer.valueOf(split[0]));
		dto.setStr(split[1]);
		return dto;
	}

}
